표에서 셀 그룹을 나타내며 하나의 행 단위 역할을 한다.
<table>
요소의 자식으로 위치하는 경우에는 <table>
요소의 자식으로 <tbody>
요소가 없는 경우에 가능하며 <caption>
, <colgroup>
, <thead>
요소 뒤에 있어야 한다.
0
개 이상의 <td>
, <th>
요소 및 스크립트 지원(script supporting) 요소
<tr>
요소 바로 뒤에 다른 <tr>
요소가 오거나 이후에 부모 요소의 콘텐츠가 더 이상 존재하지 않는 경우 종료 태그를 생략할 수 있다.
[Exposed=Window]
interface HTMLTableRowElement : HTMLElement {
[HTMLConstructor] constructor();
readonly attribute long rowIndex;
readonly attribute long sectionRowIndex;
[SameObject] readonly attribute HTMLCollection cells;
HTMLTableCellElement insertCell(optional long index = -1);
[CEReactions] undefined deleteCell(long index);
// also has obsolete members
};
<table> <tr> <td></td> <td></td> </tr> <tr> <td></td> <td></td> </tr> </table>
일부 글로벌 애트리뷰트는 이 요소에서 사용되지 않을 수 있다.
일부 글로벌 이벤트 핸들러는 이 요소에서 사용되지 않을 수 있다. 이벤트 등록은 자바스크립트 사용을 권장한다.